Write-Host -ForegroundColor Yellow "Windows: Configuring Firewall Rules."
netsh advfirewall firewall add rule name=TCP1179 dir=in action=allow protocol=TCP localport=1179 | Out-Null
netsh advfirewall firewall add rule name=TCP1311 dir=in action=allow protocol=TCP localport=1311 | Out-Null
netsh advfirewall firewall add rule name=TCP2103 dir=in action=allow protocol=TCP localport=2103 | Out-Null
netsh advfirewall firewall add rule name=TCP2105 dir=in action=allow protocol=TCP localport=2105 | Out-Null
netsh advfirewall firewall add rule name=TCP2107 dir=in action=allow protocol=TCP localport=2107 | Out-Null
netsh advfirewall firewall add rule name=TCP2626 dir=in action=allow protocol=TCP localport=2626 | Out-Null
netsh advfirewall firewall add rule name=TCP32843 dir=in action=allow protocol=TCP localport=32843 | Out-Null
netsh advfirewall firewall add rule name=TCP32844 dir=in action=allow protocol=TCP localport=32844 | Out-Null
netsh advfirewall firewall add rule name=TCP42510 dir=in action=allow protocol=TCP localport=42510 | Out-Null
netsh advfirewall firewall add rule name=TCP49152 dir=in action=allow protocol=TCP localport=49152 | Out-Null
netsh advfirewall firewall add rule name=TCP49153 dir=in action=allow protocol=TCP localport=49153 | Out-Null
netsh advfirewall firewall add rule name=TCP49154 dir=in action=allow protocol=TCP localport=49154 | Out-Null
netsh advfirewall firewall add rule name=TCP51509 dir=in action=allow protocol=TCP localport=51509 | Out-Null
netsh advfirewall firewall add rule name=TCP51781 dir=in action=allow protocol=TCP localport=51781 | Out-Null
netsh advfirewall firewall add rule name=TCP5357 dir=in action=allow protocol=TCP localport=5357 | Out-Null
netsh advfirewall firewall add rule name=TCP55552 dir=in action=allow protocol=TCP localport=55552 | Out-Null
netsh advfirewall firewall add rule name=TCP55697 dir=in action=allow protocol=TCP localport=55697 | Out-Null
netsh advfirewall firewall add rule name=TCP5723 dir=in action=allow protocol=TCP localport=5723 | Out-Null
netsh advfirewall firewall add rule name=TCP58204 dir=in action=allow protocol=TCP localport=58204 | Out-Null
netsh advfirewall firewall add rule name=TCP60541 dir=in action=allow protocol=TCP localport=60541 | Out-Null
netsh advfirewall firewall add rule name=TCP62151 dir=in action=allow protocol=TCP localport=62151 | Out-Null
netsh advfirewall firewall add rule name=TCP62213 dir=in action=allow protocol=TCP localport=62213 | Out-Null
netsh advfirewall firewall add rule name=TCP62326 dir=in action=allow protocol=TCP localport=62326 | Out-Null
netsh advfirewall firewall add rule name=TCP7778 dir=in action=allow protocol=TCP localport=7778 | Out-Null
netsh advfirewall firewall add rule name=TCP7779 dir=in action=allow protocol=TCP localport=7779 | Out-Null
netsh advfirewall firewall add rule name=TCP8000 dir=in action=allow protocol=TCP localport=8000 | Out-Null
netsh advfirewall firewall add rule name=TCP88 dir=in action=allow protocol=TCP localport=88 | Out-Null
netsh advfirewall firewall add rule name=TCP888 dir=in action=allow protocol=TCP localport=888 | Out-Null
netsh advfirewall firewall add rule name=TCP8888 dir=in action=allow protocol=TCP localport=8888 | Out-Null
netsh advfirewall firewall add rule name=UDP3702 dir=in action=allow protocol=UDP localport=3702 | Out-Null
netsh advfirewall firewall add rule name=UDP49217 dir=in action=allow protocol=UDP localport=49217 | Out-Null
netsh advfirewall firewall add rule name=UDP49444 dir=in action=allow protocol=UDP localport=49444 | Out-Null
netsh advfirewall firewall add rule name=UDP49885 dir=in action=allow protocol=UDP localport=49885 | Out-Null
netsh advfirewall firewall add rule name=UDP50809 dir=in action=allow protocol=UDP localport=50809 | Out-Null
netsh advfirewall firewall add rule name=UDP52070 dir=in action=allow protocol=UDP localport=52070 | Out-Null
netsh advfirewall firewall add rule name=UDP52073 dir=in action=allow protocol=UDP localport=52073 | Out-Null
netsh advfirewall firewall add rule name=UDP52073 dir=in action=allow protocol=UDP localport=59871 | Out-Null
netsh advfirewall firewall add rule name=UDP52511 dir=in action=allow protocol=UDP localport=52511 | Out-Null
netsh advfirewall firewall add rule name=UDP53195 dir=in action=allow protocol=UDP localport=53195 | Out-Null
netsh advfirewall firewall add rule name=UDP53999 dir=in action=allow protocol=UDP localport=53999 | Out-Null
netsh advfirewall firewall add rule name=UDP54396 dir=in action=allow protocol=UDP localport=54396 | Out-Null
netsh advfirewall firewall add rule name=UDP54397 dir=in action=allow protocol=UDP localport=54397 | Out-Null
netsh advfirewall firewall add rule name=UDP54760 dir=in action=allow protocol=UDP localport=54760 | Out-Null
netsh advfirewall firewall add rule name=UDP57094 dir=in action=allow protocol=UDP localport=57094 | Out-Null
netsh advfirewall firewall add rule name=UDP57830 dir=in action=allow protocol=UDP localport=57830 | Out-Null
netsh advfirewall firewall add rule name=UDP58408 dir=in action=allow protocol=UDP localport=58408 | Out-Null
netsh advfirewall firewall add rule name=UDP59666 dir=in action=allow protocol=UDP localport=59666 | Out-Null
netsh advfirewall firewall add rule name=UDP60820 dir=in action=allow protocol=UDP localport=60820 | Out-Null
netsh advfirewall firewall add rule name=UDP61418 dir=in action=allow protocol=UDP localport=61418 | Out-Null
netsh advfirewall firewall add rule name=UDP61419 dir=in action=allow protocol=UDP localport=61419 | Out-Null
netsh advfirewall firewall add rule name=UDP62343 dir=in action=allow protocol=UDP localport=62343 | Out-Null
netsh advfirewall firewall add rule name=UDP62707 dir=in action=allow protocol=UDP localport=62707 | Out-Null
netsh advfirewall firewall add rule name=UDP62708 dir=in action=allow protocol=UDP localport=62708 | Out-Null
netsh advfirewall firewall add rule name=UDP63645 dir=in action=allow protocol=UDP localport=63645 | Out-Null
netsh advfirewall firewall add rule name=UDP65230 dir=in action=allow protocol=UDP localport=65230 | Out-Null
netsh advfirewall firewall add rule name=UDP8000 dir=in action=allow protocol=UDP localport=8000 | Out-Null
netsh firewall set portopening protocol=TCP port=1433 name=SQLPort mode=ENABLE scope=SUBNET profile=CURRENT | Out-Null
netsh firewall set portopening protocol=TCP port=32843 name=ServiceAppPort mode=ENABLE scope=ALL profile=ALL | Out-Null
netsh firewall set portopening protocol=TCP port=32844 name=ServiceAppPort mode=ENABLE scope=ALL profile=ALL | Out-Null
netsh firewall set portopening protocol=TCP port=32845 name=ServiceAppPort mode=ENABLE scope=ALL profile=ALL | Out-Null
Write-Host -ForegroundColor Yellow "Windows: Configuring Firewall Rules. COMPLETED"
